﻿@model Rated.DAL.Db.RatedItem
@{
    var continents = Rated.Website.Helpers.LocationHelper.Continents();
    var countries = Rated.Website.Helpers.LocationHelper.Countries(Model.ContinentID ?? 0);
    var localities = Rated.Website.Helpers.LocationHelper.Localities(Model.CountryID ?? 0);
    var states = Rated.Website.Helpers.LocationHelper.States(Model.LocalityID ?? 0);
    var cities = Rated.Website.Helpers.LocationHelper.Cities(Model.StateID ?? 0);
}
<div class="clearfix form" id="LocationFormContainer">
    <form method="post" id="updateLocation" action="@Url.Action("UpdateLocation", "RatedItem")">
    @Html.HiddenFor(o => Model.ID)
    <fieldset>
        <ol>
            <li class="clearfix">
                <label>
                    Continent</label>
                @Html.DropDownListFor(o => Model.ContinentID, continents, new { @class = "ContinentID" })
            </li>
            <li class="clearfix">
                <label>
                    Country</label>
                @Html.DropDownListFor(o => Model.CountryID, countries, new { @class = "CountryID" })
            </li>
            <li class="clearfix">
                <label>
                    Locality</label>
                @Html.DropDownListFor(o => Model.LocalityID, localities, new { @class = "LocalityID" })
            </li>
            <li class="clearfix">
                <label>
                    State</label>
                @Html.DropDownListFor(o => Model.StateID, states, new { @class = "StateID" })
            </li>
            <li class="clearfix">
                <label>
                    City</label>
                @Html.DropDownListFor(o => Model.CityID, cities, new { @class = "CityID" })
            </li>
        </ol>
    </fieldset>
    </form>
</div>
